import pytest
from selenium import webdriver


@pytest.fixture(scope='module')#自定义夹具
def login():
    print('登录成功')

@pytest.fixture(name='read_file')
def oper_file():
    print('打开文件')
    yield
    print('关闭文件')

@pytest.fixture(name='browser')
def oper_browser():
    driver=webdriver.Chrome()
    driver.maximize_window()
    yield driver
    driver.quit()
